home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1997 August / Oasis demo.iso / Internet / Wincim / 32bit / SCRIPTS.LIB / TRANSPAC.SCR < prev    next >
Text File  |  1997-01-30  |  1KB  |  64 lines

  1. !
  2. !  Copyright (c) 1997
  3. !  by CompuServe Incorporated, Columbus, Ohio
  4. !
  5. !  The information in this software is subject to change without
  6. !  notice and should not be construed as a commitment by CompuServe.
  7. !
  8. !  Transpac:
  9. !    Connect to Transpac
  10. !    Success:  returns %Success
  11. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  12. !
  13. !+V
  14. ! "4.0"
  15. !-V
  16.  
  17. CompuServe_NUA = "19628030";
  18. Tries = 5;
  19. twice_tried = %FALSE;
  20. on cancel goto Return_Cancel;
  21.  
  22. show "Connecting to Transpac";
  23.  
  24. Wait_Transpac:
  25.     if Tries = 0 goto Transpac_Failure;
  26.     Tries = Tries - 1;
  27.         if Tries = 4 goto Send_Address; ! First time through, blind send
  28.  
  29.     wait
  30.         "TRANSPAC"    goto Send_Address,
  31.         "ERROR"        goto Resend_Address,
  32.                 "CLR"           goto Resend_Address,
  33.         %mdm_Failure    goto Transpac_Failure,
  34.         "COM"        goto Return_Success
  35.     until 80;
  36.  
  37.     send %CR;
  38.         goto Send_Address;
  39.                                   
  40. Resend_Address:
  41.     if twice_tried = %TRUE goto Cserve_NUA_Failure;
  42.     twice_tried = %TRUE;
  43.  
  44. Send_Address:
  45.     show "Sending CompuServe NUA...";
  46.     send CompuServe_NUA & %CR;
  47.     goto Wait_Transpac;
  48.  
  49. Transpac_Failure:
  50.     define %FailureMsg = "Transpac not responding";
  51.     goto Return_Failure;
  52.  
  53. Cserve_NUA_Failure:
  54.     define %FailureMsg = "Transpac not accepting CompuServe NUA";
  55.  
  56. Return_Failure:
  57.     exit %Failure;
  58.  
  59. Return_Cancel:
  60.     exit %Cancel;
  61.  
  62. Return_Success:
  63.     exit %Success;
  64.